package org.example.controller;

import org.example.common.R;
import org.example.mapper.SysMenuRoleMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("menuRole")
public class MenuRoleController {

    @Autowired
    private SysMenuRoleMapper sysMenuRoleMapper;

    @RequestMapping("listByRoleId")
    public R listByRoleId(Long roleId){
        List<Long> mids = sysMenuRoleMapper.listByRoleId(roleId);
        return R.successed(mids);
    }
}
